package com.niiwoo.civet.trade.enums;

import com.niiwoo.tripod.provider.exception.NoSuchEnumValueException;
import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
@Getter
public enum HomePageRecomConfigEnum {
    //1:新手智能投;2:智能投;3:散标
    NOIVCE_PROJECT((byte)4,"新手散标"),
    PROJECT((byte) 3, "散标"),
    NORMAL_INTELLIGENCE((byte) 2, "普通智能投"),
    NOVICE_INTELLIGENCE((byte) 1, "新手智能投");

    private Byte type;
    private String desc;

    public static HomePageRecomConfigEnum enumOf(Byte value) {
        for (HomePageRecomConfigEnum retEnum : values()) {
            if (retEnum.type.equals(value)) {
                return retEnum;
            }
        }
        throw new NoSuchEnumValueException("HomePageRecomConfigEnum:" + value);
    }

    @AllArgsConstructor
    @Getter
    public enum HomePageLabelEnum {
        NOVICE_PROJECT((byte)4,"新手推荐"),
        PROJECT((byte) 3, "热门推荐"),
        NORMAL_INTELLIGENCE((byte) 2, "热门推荐"),
        NOVICE((byte) 1, "新手推荐");

        private Byte type;
        private String desc;

        public static HomePageLabelEnum enumOf(Byte value) {
            for (HomePageLabelEnum retEnum : values()) {
                if (retEnum.type.equals(value)) {
                    return retEnum;
                }
            }
            throw new NoSuchEnumValueException("HomePageLabelEnum:" + value);
        }
    }

}
